<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="rootTask" value="${requestScope.rootTask}" />
<c:set var="tasks" value="${requestScope.tasks}" />
<c:set var="sequence" value="${param.sequence}" />
<c:if test="${rootTask != null}">
    <li class="addDimensionMemberLink">
        <%--<input type="hidden" name="updateTask" value="${rootTask.idTask}" />--%>
        <label for="type-1-1">${rootTask.class.simpleName == 'Milestone' ? 'Hito' : 'Etiqueta'}:</label>
        <input style="width:100px !important;" type="text" id="updateTaskName-${rootTask.idTask}" name="updateTaskName-${rootTask.idTask}" class="designerWizardInput" value="${rootTask.name}" />
        <c:if test="${rootTask.class.simpleName == 'Milestone'}">
            <fmt:formatDate var="beginDate" pattern="dd/MM/yyyy" value="${rootTask.beginDate}" />
            <fmt:formatDate var="endDate" pattern="dd/MM/yyyy" value="${rootTask.endDate}" />
            [ <input style="width:100px !important;" class="begin-picker designerWizardInput" value="${beginDate}" name="updateBeginDate-${rootTask.idTask}" type="text" /> - <input style="width:100px !important;" class="end-picker designerWizardInput" value="${endDate}" name="updateEndDate-${rootTask.idTask}" type="text" /> ]
        </c:if>
        <c:choose>
            <c:when test="${tasks[rootTask] != null && empty tasks[rootTask]}" />
            <c:otherwise>
                <ul id="newDimensionMembersChild">
                    <c:forEach var="task" items="${tasks[rootTask]}">
                        <c:set var="rootTask" value="${task}" scope="request" />
                        <c:set var="tasks" value="${requestScope.tasks}" scope="request" />
                        <jsp:include page="projectTask.jsp" />
                    </c:forEach>
                    <!--
                    <li class="addDimensionMemberLink">
                        <a href="#">Agregar tarea</a>
                    </li>
                    -->
                </ul>
            </c:otherwise>
        </c:choose>
    </li>
    <!--
    <li class="addDimensionMemberLink">
        <a href="#">Agregar tarea</a>
    </li>
    -->
</c:if>

